package sring;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service //使用@Service注解声明当前UseFunctionService类是Spring管理的一个Bean

public class UseFunctionService {
    //使用@Autowired 将FunctionService的实体Bean注入到UseFunctionService中
    //让UseFunctionService具备FunctionService的功能，此处使用JSR-330的Inject
    //注解或者JSR-250的@Resource注解等效
    @Autowired
    FunctionService functionService;
    public String SayHello(String word){
        return functionService.sayHello(word);
    }
}
